projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7222bda
)
builder-tool: Don't strip the xml declaration
author
Matthias Clasen
<mclasen@redhat.com>
Thu, 28 Mar 2019 23:28:05 +0000
(19:28 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Thu, 28 Mar 2019 23:28:05 +0000
(19:28 -0400)
This is useful for interoperability with other tools.
gtk/tools/gtk-builder-tool-simplify.c
patch
|
blob
|
history
diff --git
a/gtk/tools/gtk-builder-tool-simplify.c
b/gtk/tools/gtk-builder-tool-simplify.c
index 2c7f4e52cf03bbfa400c7180d8f41b317402576d..44f5f59e532bef32a9098a8261624b3e17b7128e 100644
(file)
--- a/
gtk/tools/gtk-builder-tool-simplify.c
+++ b/
gtk/tools/gtk-builder-tool-simplify.c
@@
-1264,9
+1264,16
@@
dump_element (Element *element,
g_fprintf (output, "/>\n");
}
+static void
+write_xml_declaration (FILE *output)
+{
+ g_fprintf (output, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+}
+
static void
dump_tree (MyParserData *data)
{
+ write_xml_declaration (data->output);
dump_element (data->root, data->output, 0);
}